window.onload = function () {
    window.parent.loadingMskBlock();
    test().then(() =>{
        window.parent.loadingMskNone();
    })
};
function test() {
    return new Promise(resolve => {
        setTimeout(() => {
            post_Message();
            resolve()
        }, 1000);
    })
}

function post_Message(i) {
    let height = document.body.scrollHeight;
    top.postMessage(height + 50, "*");
}

function jumpPlayListInfo(id, count) {
    let width = document.body.clientWidth;
    if (width > 1024) {
        window.parent.jumpto(`/playlist/info?type=playlist&listId=${id}&trackCount1.=${count}`)
    } else {
        window.parent.jumpto(`/playlist/info_m?type=playlist&listId=${id}&trackCount=${count}`)
    }
}

function jumpAlbumInfo(albumId, songId) {
    let width = document.body.clientWidth;
    if (width > 1024) {
        window.parent.jumpto(`/playlist/info?type=album&albumId=${albumId}&singerId=${songId}`)
    } else {
        window.parent.jumpto(`/playlist/info_m?type=album&albumId=${albumId}&singerId=${songId}`)
    }
}

function jumpSingleSongInfo(albumId, songId) {
    let width = document.body.clientWidth;
    if (width > 1024) {
        window.parent.jumpto(`/playlist/info?type=song&singerId=${songId}`)
    } else {
        window.parent.jumpto(`/playlist/info_m?type=song&singerId=${songId}`)
    }
}

